import request from '@/utils/request'

// 查询返修检验单列表
export function listRrqc(query) {
  return request({
    url: '/qc/rrqc/list',
    method: 'get',
    params: query
  })
}

// 查询返修检验单详细
export function getRrqc(rrqcId) {
  return request({
    url: '/qc/rrqc/' + rrqcId,
    method: 'get'
  })
}

// 新增返修检验单
export function addRrqc(data) {
  return request({
    url: '/qc/rrqc',
    method: 'post',
    data: data
  })
}

// 修改返修检验单
export function updateRrqc(data) {
  return request({
    url: '/qc/rrqc',
    method: 'put',
    data: data
  })
}

// 删除返修检验单
export function delRrqc(rrqcId) {
  return request({
    url: '/qc/rrqc/' + rrqcId,
    method: 'delete'
  })
}


// 查询返修检验单详细
export function getRrqcInfoBySourceDocId(sourceDocId) {
  return request({
    url: '/qc/rrqc/getInfoBySourceDocId/' + sourceDocId,
    method: 'get'
  })
}

// 免检
export function exemptRqc(data) {
  return request({
    url: '/qc/rrqc/exempt',
    method: 'post',
    data: data
  })
}
